\(\int \frac {(c+a^2 c x^2) \arctan (a x)}{x} \, dx\) [153]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [F]
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [F]
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 18, antiderivative size = 62 \[ \int \frac {\left (c+a^2 c x^2\right ) \arctan (a x)}{x} \, dx=-\frac {1}{2} a c x+\frac {1}{2} c \arctan (a x)+\frac {1}{2} a^2 c x^2 \arctan (a x)+\frac {1}{2} i c \operatorname {PolyLog}(2,-i a x)-\frac {1}{2} i c \operatorname {PolyLog}(2,i a x) \]

[Out]

-1/2*a*c*x+1/2*c*arctan(a*x)+1/2*a^2*c*x^2*arctan(a*x)+1/2*I*c*polylog(2,-I*a*x)-1/2*I*c*polylog(2,I*a*x)

Rubi [A] (verified)

Time = 0.05 (sec) , antiderivative size = 62, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {5070, 4940, 2438, 4946, 327, 209} \[ \int \frac {\left (c+a^2 c x^2\right ) \arctan (a x)}{x} \, dx=\frac {1}{2} a^2 c x^2 \arctan (a x)+\frac {1}{2} c \arctan (a x)+\frac {1}{2} i c \operatorname {PolyLog}(2,-i a x)-\frac {1}{2} i c \operatorname {PolyLog}(2,i a x)-\frac {a c x}{2} \]

[In]

Int[((c + a^2*c*x^2)*ArcTan[a*x])/x,x]

[Out]

-1/2*(a*c*x) + (c*ArcTan[a*x])/2 + (a^2*c*x^2*ArcTan[a*x])/2 + (I/2)*c*PolyLog[2, (-I)*a*x] - (I/2)*c*PolyLog[
2, I*a*x]

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 327

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[c^(n - 1)*(c*x)^(m - n + 1)*((a + b*x^n
)^(p + 1)/(b*(m + n*p + 1))), x] - Dist[a*c^n*((m - n + 1)/(b*(m + n*p + 1))), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
 c, n, m, p, x]

Rule 2438

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2, (-c)*e*x^n]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 4940

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))/(x_), x_Symbol] :> Simp[a*Log[x], x] + (Dist[I*(b/2), Int[Log[1 - I*c*x
]/x, x], x] - Dist[I*(b/2), Int[Log[1 + I*c*x]/x, x], x]) /; FreeQ[{a, b, c}, x]

Rule 4946

Int[((a_.) + ArcTan[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)*((a + b*ArcTan[c*x^
n])^p/(m + 1)), x] - Dist[b*c*n*(p/(m + 1)), Int[x^(m + n)*((a + b*ArcTan[c*x^n])^(p - 1)/(1 + c^2*x^(2*n))),
x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0] && (EqQ[p, 1] || (EqQ[n, 1] && IntegerQ[m])) && NeQ[m, -1]

Rule 5070

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*((f_.)*(x_))^(m_)*((d_) + (e_.)*(x_)^2)^(q_.), x_Symbol] :> Dist[
d, Int[(f*x)^m*(d + e*x^2)^(q - 1)*(a + b*ArcTan[c*x])^p, x], x] + Dist[c^2*(d/f^2), Int[(f*x)^(m + 2)*(d + e*
x^2)^(q - 1)*(a + b*ArcTan[c*x])^p, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && EqQ[e, c^2*d] && GtQ[q, 0] &&
 IGtQ[p, 0] && (RationalQ[m] || (EqQ[p, 1] && IntegerQ[q]))

Rubi steps \begin{align*} \text {integral}& = c \int \frac {\arctan (a x)}{x} \, dx+\left (a^2 c\right ) \int x \arctan (a x) \, dx \\ & = \frac {1}{2} a^2 c x^2 \arctan (a x)+\frac {1}{2} (i c) \int \frac {\log (1-i a x)}{x} \, dx-\frac {1}{2} (i c) \int \frac {\log (1+i a x)}{x} \, dx-\frac {1}{2} \left (a^3 c\right ) \int \frac {x^2}{1+a^2 x^2} \, dx \\ & = -\frac {1}{2} a c x+\frac {1}{2} a^2 c x^2 \arctan (a x)+\frac {1}{2} i c \operatorname {PolyLog}(2,-i a x)-\frac {1}{2} i c \operatorname {PolyLog}(2,i a x)+\frac {1}{2} (a c) \int \frac {1}{1+a^2 x^2} \, dx \\ & = -\frac {1}{2} a c x+\frac {1}{2} c \arctan (a x)+\frac {1}{2} a^2 c x^2 \arctan (a x)+\frac {1}{2} i c \operatorname {PolyLog}(2,-i a x)-\frac {1}{2} i c \operatorname {PolyLog}(2,i a x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 62, normalized size of antiderivative = 1.00 \[ \int \frac {\left (c+a^2 c x^2\right ) \arctan (a x)}{x} \, dx=-\frac {1}{2} a c x+\frac {1}{2} c \arctan (a x)+\frac {1}{2} a^2 c x^2 \arctan (a x)+\frac {1}{2} i c \operatorname {PolyLog}(2,-i a x)-\frac {1}{2} i c \operatorname {PolyLog}(2,i a x) \]

[In]

Integrate[((c + a^2*c*x^2)*ArcTan[a*x])/x,x]

[Out]

-1/2*(a*c*x) + (c*ArcTan[a*x])/2 + (a^2*c*x^2*ArcTan[a*x])/2 + (I/2)*c*PolyLog[2, (-I)*a*x] - (I/2)*c*PolyLog[
2, I*a*x]

Maple [A] (verified)

Time = 0.14 (sec) , antiderivative size = 74, normalized size of antiderivative = 1.19

method result size
risch \(\frac {i c \ln \left (-i a x +1\right ) x^{2} a^{2}}{4}+\frac {c \arctan \left (a x \right )}{2}-\frac {a c x}{2}-\frac {i c \operatorname {dilog}\left (-i a x +1\right )}{2}-\frac {i c \ln \left (i a x +1\right ) x^{2} a^{2}}{4}+\frac {i c \operatorname {dilog}\left (i a x +1\right )}{2}\) \(74\)
meijerg \(\frac {c \left (-2 a x +\frac {2 \left (3 a^{2} x^{2}+3\right ) \arctan \left (a x \right )}{3}\right )}{4}+\frac {c \left (-\frac {2 i a x \operatorname {polylog}\left (2, i \sqrt {a^{2} x^{2}}\right )}{\sqrt {a^{2} x^{2}}}+\frac {2 i a x \operatorname {polylog}\left (2, -i \sqrt {a^{2} x^{2}}\right )}{\sqrt {a^{2} x^{2}}}\right )}{4}\) \(86\)
derivativedivides \(\frac {a^{2} c \,x^{2} \arctan \left (a x \right )}{2}+c \arctan \left (a x \right ) \ln \left (a x \right )-\frac {c \left (a x -\arctan \left (a x \right )-i \ln \left (a x \right ) \ln \left (i a x +1\right )+i \ln \left (a x \right ) \ln \left (-i a x +1\right )-i \operatorname {dilog}\left (i a x +1\right )+i \operatorname {dilog}\left (-i a x +1\right )\right )}{2}\) \(90\)
default \(\frac {a^{2} c \,x^{2} \arctan \left (a x \right )}{2}+c \arctan \left (a x \right ) \ln \left (a x \right )-\frac {c \left (a x -\arctan \left (a x \right )-i \ln \left (a x \right ) \ln \left (i a x +1\right )+i \ln \left (a x \right ) \ln \left (-i a x +1\right )-i \operatorname {dilog}\left (i a x +1\right )+i \operatorname {dilog}\left (-i a x +1\right )\right )}{2}\) \(90\)
parts \(\frac {a^{2} c \,x^{2} \arctan \left (a x \right )}{2}+c \arctan \left (a x \right ) \ln \left (x \right )-\frac {c a \left (x -\frac {\arctan \left (a x \right )}{a}-\frac {i \ln \left (x \right ) \left (\ln \left (i a x +1\right )-\ln \left (-i a x +1\right )\right )}{a}-\frac {i \left (\operatorname {dilog}\left (i a x +1\right )-\operatorname {dilog}\left (-i a x +1\right )\right )}{a}\right )}{2}\) \(90\)

[In]

int((a^2*c*x^2+c)*arctan(a*x)/x,x,method=_RETURNVERBOSE)

[Out]

1/4*I*c*ln(1-I*a*x)*x^2*a^2+1/2*c*arctan(a*x)-1/2*a*c*x-1/2*I*c*dilog(1-I*a*x)-1/4*I*c*ln(1+I*a*x)*x^2*a^2+1/2
*I*c*dilog(1+I*a*x)

Fricas [F]

\[ \int \frac {\left (c+a^2 c x^2\right ) \arctan (a x)}{x} \, dx=\int { \frac {{\left (a^{2} c x^{2} + c\right )} \arctan \left (a x\right )}{x} \,d x } \]

[In]

integrate((a^2*c*x^2+c)*arctan(a*x)/x,x, algorithm="fricas")

[Out]

integral((a^2*c*x^2 + c)*arctan(a*x)/x, x)

Sympy [F]

\[ \int \frac {\left (c+a^2 c x^2\right ) \arctan (a x)}{x} \, dx=c \left (\int \frac {\operatorname {atan}{\left (a x \right )}}{x}\, dx + \int a^{2} x \operatorname {atan}{\left (a x \right )}\, dx\right ) \]

[In]

integrate((a**2*c*x**2+c)*atan(a*x)/x,x)

[Out]

c*(Integral(atan(a*x)/x, x) + Integral(a**2*x*atan(a*x), x))

Maxima [A] (verification not implemented)

none

Time = 0.32 (sec) , antiderivative size = 66, normalized size of antiderivative = 1.06 \[ \int \frac {\left (c+a^2 c x^2\right ) \arctan (a x)}{x} \, dx=-\frac {1}{2} \, a c x - \frac {1}{4} \, \pi c \log \left (a^{2} x^{2} + 1\right ) + c \arctan \left (a x\right ) \log \left (a x\right ) + \frac {1}{2} \, {\left (a^{2} c x^{2} + c\right )} \arctan \left (a x\right ) - \frac {1}{2} i \, c {\rm Li}_2\left (i \, a x + 1\right ) + \frac {1}{2} i \, c {\rm Li}_2\left (-i \, a x + 1\right ) \]

[In]

integrate((a^2*c*x^2+c)*arctan(a*x)/x,x, algorithm="maxima")

[Out]

-1/2*a*c*x - 1/4*pi*c*log(a^2*x^2 + 1) + c*arctan(a*x)*log(a*x) + 1/2*(a^2*c*x^2 + c)*arctan(a*x) - 1/2*I*c*di
log(I*a*x + 1) + 1/2*I*c*dilog(-I*a*x + 1)

Giac [F]

\[ \int \frac {\left (c+a^2 c x^2\right ) \arctan (a x)}{x} \, dx=\int { \frac {{\left (a^{2} c x^{2} + c\right )} \arctan \left (a x\right )}{x} \,d x } \]

[In]

integrate((a^2*c*x^2+c)*arctan(a*x)/x,x, algorithm="giac")

[Out]

sage0*x

Mupad [B] (verification not implemented)

Time = 0.61 (sec) , antiderivative size = 57, normalized size of antiderivative = 0.92 \[ \int \frac {\left (c+a^2 c x^2\right ) \arctan (a x)}{x} \, dx=\left \{\begin {array}{cl} 0 & \text {\ if\ \ }a=0\\ a^2\,c\,\mathrm {atan}\left (a\,x\right )\,\left (\frac {1}{2\,a^2}+\frac {x^2}{2}\right )-\frac {a\,c\,x}{2}-\frac {c\,\left ({\mathrm {Li}}_{\mathrm {2}}\left (1-a\,x\,1{}\mathrm {i}\right )-{\mathrm {Li}}_{\mathrm {2}}\left (1+a\,x\,1{}\mathrm {i}\right )\right )\,1{}\mathrm {i}}{2} & \text {\ if\ \ }a\neq 0 \end {array}\right . \]

[In]

int((atan(a*x)*(c + a^2*c*x^2))/x,x)

[Out]

piecewise(a == 0, 0, a ~= 0, - (c*(dilog(- a*x*1i + 1) - dilog(a*x*1i + 1))*1i)/2 - (a*c*x)/2 + a^2*c*atan(a*x
)*(1/(2*a^2) + x^2/2))